<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
<<<<<<< HEAD
    <HelloWorld msg="Hello !"/>
=======
    <HelloWorld msg="Welcome to Your Vue.js App"/>
>>>>>>> 5ca2850b62dbb01fb1562b4612baa869a4debc5b
  </div>
  
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'app',
  components: {
    HelloWorld
  }
}

import CryptoJS from 'crypto-js'

console.log("hello")

			var key  = CryptoJS.enc.Utf8.parse("8F4D365EB3EA6A65"); 
			console.log(key)
            var iv  = CryptoJS.enc.Utf8.parse(Math.floor(Math.random()*(9999999999999999-1000000000000000))+1000000000000000);
            console.log(iv)
			var srcs = CryptoJS.enc.Utf8.parse('afdadf'); 
			console.log(srcs)
            var encrypted = CryptoJS.AES.encrypt(srcs, key, { iv: iv,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});
            var new_pwd = iv+encrypted.ciphertext.toString();
            console.log(new_pwd)
			
			
			
			      function Decrypt(word, keyStr) {
			            let key = CryptoJS.enc.Utf8.parse('1234567890123456')
			            let iv = CryptoJS.enc.Utf8.parse('1234567890123456')
			            var decrypt = CryptoJS.AES.decrypt(word, key, {
			                iv: iv,
			                mode: CryptoJS.mode.CBC,
			                padding: CryptoJS.pad.ZeroPadding
			            })
			            var decryptedStr = decrypt.toString(CryptoJS.enc.Utf8)
			            return decryptedStr.toString()
			        }
			        var pwd = '';
			        pwd = Decrypt('wU/2oHphdJ5qzRQh9AltsQ==', '1234567890123456');
			        console.log(pwd);
</script>


<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
